package org.example.petitionplatformsystem.dto.UserDTO;

import lombok.Getter;
import lombok.Setter;
import org.example.petitionplatformsystem.dao.model.Authentication;
import org.example.petitionplatformsystem.dao.model.Users;

@Getter
@Setter
public class UsersInfoDTO {
    private Long userId;

    private String userName;
    private String phoneNumber;
    private Boolean isAuthenticated;
    private String fullName;
    private String idCard;
    public UsersInfoDTO(Users users, Authentication authentication){
        this.userId = users.getUserId();
        this.userName = users.getUsername();
        this.phoneNumber = users.getPhoneNumber();
        this.isAuthenticated = users.getIsAuthenticated();
        this.fullName = authentication.getFullName();
        this.idCard = authentication.getIdCardNumber();
    }
}
